/**
 * Created by Sun on 2020/4/10.
 */
$(function () {
    $.ajax({
        url:'Crud/pageAll',
        success:function (data) {
            for(var i = 0;i<data.length;i++){
                var text = "<tr>"+
                "<td>"+data[i].id+"</td>"+
                "<td>"+data[i].username+"</td>"+
                "<td>"+data[i].password+"</td>"+
                "<td>"+data[i].createtime+"</td>"+
                "<td>"+data[i].status+"</td>"+
                "<td>"+
                "<a href=\"Crud/delete?id="+data[i].id+"\" class='btn btn-danger'>删除</a>"+
                    "<a href=\"crudupdate.html?id="+data[i].id+"\" class='btn btn-success'>修改</a>"+
                    "</td>"+
                    "</tr>"
                var obj =  $(".pool");
                obj.append(text);
            }
        }
    })
})